﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="member_Default" %>

	<link rel="stylesheet" href="/Public/Home/chosen_v1.5.1/chosen.css" />
	<link rel="stylesheet" href="/Public/Home/css/colorbox.css" />
	<style type="text/css">
		<!--
		.QiyeC a{border:1px solid #d2ccc4;color:#666;padding: 3px 10px;display:inline-block;margin:5px 0;}
		#delImage{display: block; position: absolute;bottom:5px;right:5px;background:#e95515;border:none;color:#FFF;overflow:visible;padding:5px 10px;cursor:pointer;}
		.alert-warning{
			position:relative;
			margin:0 30px 15px;
			padding:25px;
			color:#a94442;
			background-color:#f2dede;
			border:1px solid #ebccd1;
			border-radius:4px;
		}
		.alert-warning .close{
			position:absolute;
			top:25px;
			right:25px;
		}
        .listbox{margin:10px 0 0 15px;}
        .default-bg{
	        background-image: url(/public/home_v2/images/bg.jpg);
	        background-position: center center;	
	        background-repeat: no-repeat;	
	        background-attachment: fixed;	
	        background-size: cover;	
	        background-color: #464646;
	        position:absolute;width:100%;top:0;bottom:0;
           }
        .default-bg .header{height:90px;padding-top:20px;}
        .default-bg .header .logo{width:206px;height:70px;display:inline-block}
        .default-bg .header .login-info{height:70px;display:inline-block;text-align:right;float:right;line-height:70px;color:#fff;font-size:20px;}
        .default-bg .header .login-info a {color:#FFFFFF;margin-left:20px;}
        .default-bg .footer{position:absolute;bottom:0;left:0;text-align:center;color:#464646;padding:15px 0;width:100%;}
        .default-bg .search{
	        display:block;margin:0 auto;background-color: rgba(255,255,255,0.3);margin:0 10%;min-height:400px;position:relative;padding-bottom:64px;
        }
		-->
	</style>
	<div class="Member_content">
        <h1 class="member_iconTit">
			关于电子文档管理平台
		</h1>
		<h2 class="jies">说明：
			<br />1、推荐使用firefox、chrome、360极速等支持HTM5的浏览器。
			<br />2、本程序可查询检验报告、批件、商品包装、两票制发票、随货同行单、电子发票。
		</h2>
        <form id="form1" runat="server">
            <div class="msearch">
                 <asp:button runat="server" ID="ToDw" CssClass="msbut submit-search" style="margin:0 10px 0 10px;" text="导入单位" OnClick="btnSave_Click" />
                 <asp:button runat="server" ID="ToSp" CssClass="msbut submit-search" style="margin:0 10px 0 10px;" text="导入商品" OnClick="btnSave_Click" />
                 <asp:button runat="server" ID="ToRk" CssClass="msbut submit-search" style="margin:0 10px 0 10px;" text="导入入库" OnClick="btnSave_Click" />
                 <asp:button runat="server" ID="ToCk" CssClass="msbut submit-search" style="margin:0 10px 0 10px;" text="导入出库" OnClick="btnSave_Click" />
            </div>
            <div class="mbig">
                <asp:literal ID="ResultDeBug" runat="server"></asp:literal>
                    <asp:literal ID="msg" runat="server"></asp:literal>
                    <asp:gridview ID="DataList" runat="server" CssClass="sebig">
                        <RowStyle CssClass="searli" />
                        <HeaderStyle CssClass="setit" />
                    </asp:gridview>            
            </div>  
        </form>  	
	</div>
	<div aria-hidden="true" role="dialog" tabindex="-1" id="modal" class="modal" style="display: none;"></div>
    <script src="/Public/Home/js/jquery.js" type=text/javascript></script>
    <script src="/Public/Home_v2/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="/Public/Home/lhgdialog/lhgdialog.js?skin=discuz"></script>
    <script type="text/javascript" src="/Public/Home/js/Validform_v5.3.2_min.js"></script>

    <script type="text/javascript">
        var userid = '';
        var $modal = $('#modal');
        function show_login() {
            $modal.load('/user/loginview.aspx', {}, function () {
                $modal.modal('show');
            });
            return false;
        }
        $(".invoice").click(function () {;
            $("#wldw2").val($("#wldw").val());
        })
        $(document).ready(window.onresize = function () {
            var whe = $(window).height() - $(".search").height() - 134;
            $(".search").css("marginTop", whe / 2);
        });
        $(document).ready(function () {
            $('.register').on('click', function () {
                $modal.load('/user/registerview.aspx', {}, function () {
                    $modal.modal('show');
                });
                return false;
            });

            $modal.on('show.bs.modal', function () {
                if (!('placeholder' in document.createElement('input'))) {
                    $('#modal').find('input[placeholder],textarea[placeholder]').each(function () {
                        var that = $(this),
                        text = that.attr('placeholder');

                        if (that.attr('type') == 'text') {
                            if (that.val() === "") {
                                that.val(text).addClass('placeholder');
                            }
                            that.focus(function () {
                                if (that.val() === text) {
                                    that.val("").removeClass('placeholder');
                                }
                            })
                            .blur(function () {
                                if (that.val() === "") {
                                    that.val(text).addClass('placeholder');
                                }
                            })
                            .closest('form').submit(function () {
                                if (that.val() === text) {
                                    that.val('');
                                }
                            });
                        }
                    });
                }
                $('.validform').Validform({
                    tiptype: function (msg, o, cssctl) {
                        if (!o.obj.is("form")) {//验证表单元素时o.obj为该表单元素，全部验证通过提交表单时o.obj为该表单对象;
                            var $obj = o.obj.closest(".form-group");
                            if (o.type == 1) {
                                $obj.removeClass('has-success has-error').addClass('has-warning');
                            } else if (o.type == 2) {
                                $obj.removeClass('has-warning has-error').addClass('has-success');
                            } else if (o.type == 3) {
                                $obj.removeClass('has-success has-warning').addClass('has-error');
                            } else if (o.type == 4) {
                                $obj.removeClass('has-success has-error').addClass('has-warning');
                            }
                            $obj.find('.help-block').text(msg);
                        }
                    },
                    showAllError: true,
                    ajaxPost: true,
                    beforeSubmit: function (curform) {
                        $('#btn-submit-login').button('loading');
                    },
                    datatype: {
                        "mobile": /^1[0-9]{10}$/,   //手机
                        "phone": function (gets, obj, curform, regxp) {
                            var reg1 = regxp["m"],
                                reg2 = regxp["e"],
                                mobile = curform.find(".mobile");
                            if (mobile.val() == '') {
                                if (reg2.test(gets)) { return true; }
                            } else {
                                if (reg1.test(mobile.val())) {
                                    if (gets == '' || reg2.test(gets)) {
                                        return true;
                                    }
                                }
                            }
                            return false;
                        }
                    },
                    callback: function (data) {
                        if (data.code == 1) {
                            toastr.success(false, data.msg ? data.msg : '登录成功', {
                                timeOut: 1000,
                                onHidden: function () {
                                    window.location.href = data.url;
                                }
                            });
                        } else {
                            toastr.error(false, data.msg ? data.msg : '抱歉，系统错误，请稍后再试', {
                                timeOut: 1000,
                                onHidden: function () {
                                    $('#btn-submit-login').button('reset');
                                }
                            });
                            return false;
                        }
                    }
                });
            });



            if (!('placeholder' in document.createElement('input'))) {

                $('input[placeholder],textarea[placeholder]').each(function () {
                    var that = $(this),
                    text = that.attr('placeholder');
                    if (that.val() === "") {
                        that.val(text).addClass('placeholder');
                    }
                    that.focus(function () {
                        if (that.val() === text) {
                            that.val("").removeClass('placeholder');
                        }
                    })
                    .blur(function () {
                        if (that.val() === "") {
                            that.val(text).addClass('placeholder');
                        }
                    })
                    .closest('form').submit(function () {
                        if (that.val() === text) {
                            that.val('');
                        }
                    });
                });
            }

            $('.search-form').on('submit', function () {
                $form = $(this);
                if (userid.length == 0) {
                    show_login();
                    return false;
                }
                var valid = false;
                $("[type='text']", $form).each(function () {
                    if ($.trim($(this).val()) != "") {
                        valid = true;
                        return false;
                    }
                });
                if (valid === false) {
                    toastr.error(false, '请输入查询条件', {
                        timeOut: 1000,
                        onHidden: function () {
                            $("input[name='d']", $form).focus();
                        }
                    });
                    return false;
                }

                var d = $("input[name='d']", $form).val();
                var dlength = $.trim(d).length;
                if (dlength > 0) {
                    if (dlength < 4) {
                        toastr.error(false, '单据号至少输入4位才能查询', {
                            timeOut: 1000,
                            onHidden: function () {
                                $("input[name='d']", $form).focus();
                            }
                        });
                        return false;
                    }
                } else {
                    if ($form.attr('name') == 'search-batch' || $form.attr('name') == 'search-invoice') {
                        var n = $("input[name='n']", $form).val();
                        var nlength = $.trim(n).length;
                        if (nlength > 0 && nlength < 4) {
                            toastr.error(false, '批号至少输入4位才能查询', {
                                timeOut: 1000,
                                onHidden: function () {
                                    $("input[name='n']", $form).focus();
                                }
                            });
                            return false;
                        }
                    }

                    var k = $("input[name='k']", $form).val();
                    var klength = $.trim(k).length;
                    if (klength > 0 && klength < 2) {
                        toastr.error(false, '关键字至少输入2位才能查询', {
                            timeOut: 1000,
                            onHidden: function () {
                                $("input[name='k']", $form).focus();
                            }
                        });
                        return false;
                    }

                }
                //		    if($form.attr('name') == 'search-invoice'){
                //			    var is_supplier = '//';
                //		    	var username = '//';
                //		    	if(is_supplier != '1' && username.indexOf("医院") == -1 ){
                //		    		toastr.error(false, '只有医院才能查询发票', {
                //						timeOut: 1000
                //					});
                //			    	return false;
                //		    	}
                //		    }
                return true;
            });
            $('.logout').on('click', function () {
                var href = $(this).attr('href');
                $.dialog.confirm('您确定要退出登录吗？', function () {
                    window.location.href = href;
                });
                return false;
            });
            $("#aFloatTools_Show").click(function () {
                $('#divFloatToolsView').animate({ width: 'show', opacity: 'show' }, 100, function () { $('#divFloatToolsView').show(); });
                $('#aFloatTools_Show').hide();
                $('#aFloatTools_Hide').show();
            });
            $("#aFloatTools_Hide").click(function () {
                $('#divFloatToolsView').animate({ width: 'hide', opacity: 'hide' }, 100, function () { $('#divFloatToolsView').hide(); });
                $('#aFloatTools_Show').show();
                $('#aFloatTools_Hide').hide();
            });
        });
    </script>
</body>
</html>
